package cxf.spring.demo.domain.message;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlElement;
import java.util.List;
import java.util.ArrayList;

/**
 * List of messages id's
 *
 * User: Vlad Vinichenko (akerigan@gmail.com)
 * Date: 06.03.2009
 * Time: 21:12:43
 */
@XmlRootElement(name = "messages-list")
@XmlAccessorType(XmlAccessType.FIELD)
public class MessagesList {

    /**
     * List itself :)
     */
    @XmlElement(name = "message")
    List<Integer> messageIds = new ArrayList<Integer>();

    public List<Integer> getMessageIds() {
        return messageIds;
    }

    public void setMessageIds(List<Integer> messageIds) {
        this.messageIds = messageIds;
    }

    public void addMessageId(Integer messageId) {
        messageIds.add(messageId);
    }
}
